package condition;

import base.Engine;
import base.Piece;

public class PieceDropped extends Condition<Integer> {

	public PieceDropped(Engine engine, Piece piece, Integer minimum, Integer maximum) {
		super(engine, piece, minimum, maximum);
	}

	@Override
	public boolean evaluate() {
		int drops = this.getEngine().getStatistics().getDropCountByPiece(this.getPiece());
		
		return drops <= this.getMaximum() && drops >= this.getMinimum();
	}

}
